<!DOCTYPE html>
<html>
<!-- head -->
{include file="common/page/head"}
<link rel="stylesheet" href="__app__/admin/view/Group/addGroup/addGroup.css" />
<body>

{include file="common/page/header"}

<div class="content container-fluid {if $leftBarScale eq '1'} scale {/if}">
    <div class="row">
        <div class="col-md-2 left-section">
            <!-- 左导航菜单 -->
            {include file="common/page/menu"}
        </div>
        <div class="col-md-10 right-section">
            <!--内容区域-->
            <h3><i class="icon iconfont"><!--{$Think.session.currentMenu.icon}--></i>添加角色分组</h3>
            <div class="inner-section row">
                <div class="items add-div">
                    <div class="first">
                        <div class="title">角色分组名称</div>
                        <div>
                            <input type="text" name="group_name" class="group_name form-control">
                        </div>
                    </div>
                    <div class="second">
                        <div class="title">角色权限</div>
                        <div>
                            <table class="table table-striped table-hover table-bordered">
                                <tr>
                                    <th width="140px">主模块</th>
                                    <th width="140px">子模块</th>
                                    <th width="600px">权限</th>
                                </tr>
                                {foreach name="menu" item="item" key="k"}
                                {foreach name="item.son_menu" key="key" item="val"}
                                <tr>
                                    {if $key==0}
                                    <td rowspan="{$item.son_menu|count}" class="middle" key="{$k}">
                                        <label class="menu_top">
                                            <input type="checkbox" name="menu_top" value="{$item.id}" class="menu_top_{$k}">&nbsp;{$item.name}
                                        </label>
                                    </td>
                                    {/if}
                                    <td>
                                        <label class="menu">
                                            <input type="checkbox" name="menu" value="{$val.id}" class="menu_{$k}">&nbsp;{$val.name}
                                        </label> 
                                    </td>
                                    <td class="show" >
                                    	 <div style="width:100%">
                                        {foreach name="val.action_list" item="v"}
                                        <label class="action" style="display:inline-block">
                                            <input type="checkbox" name="action" value="{$v.id}" class="menu_{$k}">&nbsp;{$v.action_name}
                                        </label>
                                        {/foreach}
                                         </div>
                                    </td>
                                </tr>
                                {/foreach}
                                {/foreach}
                            </table>   
                        </div>
                    </div>
                    <div class="last">
                        <button type="button" class="btn btn-success btn-md" id='save'>保存</button>
                        <button type="button" class="btn btn-default btn-md" onclick="history.go(-1);">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="common/page/jsfiles"}
<!-- 页脚 -->
{include file="common/page/footer"}

<script type="text/javascript" src="__static__/js/form/jquery.form.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.extend.js"></script>
<script type="text/javascript" src="__app__/admin/view/Group/addGroup/addGroup.js"></script>
</body>
</html>